package com.example.android;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.view.View;

public class MEIZI extends View {
    public float X;
    public float Y;
    public MEIZI(Context context) {
        super(context);
        //动画人物的起始坐标
        X = 0;
        Y = 0;
    }
    @Override
    protected void onDraw(Canvas canvas){
        super.onDraw(canvas);
        Paint paint = new Paint();
        Bitmap bitmap = BitmapFactory.decodeResource(this.getResources(),R.drawable.s_jump);
        canvas.drawBitmap(bitmap,X,Y,paint);
        if(bitmap.isRecycled())
        {
            bitmap.recycle();
        }
}
}
